cmake_minimum_required(VERSION 3.15)
project(day2)

set(CMAKE_CXX_STANDARD 14)

##添加opencv头文件路劲
#include_directories(/home/tsl/opencv-3.4.5/install_x86/include)
##添加动态库路劲
#link_directories(/home/tsl/opencv-3.4.5/install_x86/lib)

find_package(OpenCV  4 REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

##链接动态库
#link_libraries(
#        opencv_core
#        opencv_highgui
#        opencv_imgcodecs
#        opencv_videoio
#        opencv_imgcodecs
#        )

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SRC ${CMAKE_CURRENT_SOURCE_DIR}/src)

add_executable(day2
        ${SRC}/main.cpp
        ${SRC}/wirte_video.cpp
        ${SRC}/wirte_video.cpp
        ${SRC}/frame2video.cpp
        ${SRC}/read_video.cpp)

target_link_libraries(
        day2
        ${OpenCV_LIBS}
)